<?php

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
 */

/*Route::middleware('auth:api')->get('/user', function (Request $request) {
return $request->user();
});*/
Route::prefix('v1')->namespace('Api')->group(function () {
	//支付宝回调接口
	Route::post('alipay/notify', 'PayController@notifyUrl');
	Route::post('wxpay/notify', 'PayController@notifyWxUrl');
	Route::get('alipay/returnUrl', 'PayController@returnUrl');
});

Route::prefix('v1')->namespace('Api')->middleware('api_cross')->group(function () {
	Route::get('login', 'LoginController@login');
	Route::post('user/sendMessage', 'UserController@sendMessage');
	Route::post('user/codeVerify', 'UserController@codeVerify');
	Route::post('user/register', 'UserController@register');
	Route::post('user/login', 'UserController@login');
	Route::post('user/upAssword', 'UserController@upAssword');
	Route::get('user/msgInfo', 'UserController@msgInfo');
	Route::get('resume/upload', 'ResumeController@downloadImage');
	Route::get('user/resume/{id}', 'UserController@resume');
	Route::get('user/position', 'UserController@position');
	//简历pc端插件下载
	Route::get('plugDowload', 'FeedbackController@plugDowload');
	Route::post('feedback', 'FeedbackController@add');
	Route::get('user/recruitmentInfo', 'UserController@recruitmentInfo');
	//申请简历接口
	Route::post('share/resume', 'ShareController@resumeAdd');
	Route::post('share/send', 'ShareController@sendMessage');
	Route::post('share/verify', 'ShareController@codeVerify');
	Route::post('share/wxToken', 'ShareController@getWxAccessToken');
    Route::post('user/testEmail', 'UserController@testEmail');
    Route::post('user/test', 'UserController@test');

});

Route::prefix('v1')->namespace('Api')->middleware('api_cross', 'app:api')->group(
	function () {
		Route::get('getdata', 'LoginController@getdata');
		Route::get('data', 'LoginController@data');
		//公司
		Route::post('company/createCompany', 'CompanyController@createCompany');
		Route::post('company/companyList', 'CompanyController@companyList');
		Route::post('company/choseCompany', 'CompanyController@choseCompany');
		Route::post('company/upAssword', 'CompanyController@upAssword');
		Route::post('company/configuration', 'CompanyController@configuration');
		Route::get('company/configurationInfo', 'CompanyController@configurationInfo');
		//流程步骤
		Route::get('company/all', 'CompanyController@all');
		//新增面试评价表
		Route::post('company/addEvaluaty', 'CompanyController@addEvaluaty');
		//面试评价表列表
		Route::post('company/evaluatyList', 'CompanyController@evaluatyList');
		//评价表详情
		Route::get('company/infoEvaluaty', 'CompanyController@infoEvaluaty');
		//评价表删除
		Route::post('company/evaluatyRemove', 'CompanyController@evaluatyRemove');
		//评价表删除
		Route::post('message/removeSystemsg', 'MessageController@removeSystemsg');
		//评价表修改
		Route::put('company/upEvaluaty', 'CompanyController@upEvaluaty');
		//新增面试地址
		Route::post('company/addAddress', 'CompanyController@addAddress');
		//新增面试地址
		Route::get('company/addressList', 'CompanyController@addressList');
		//邮件配置新增与修改
		Route::post('company/addMail', 'CompanyController@addMail');
		//邮件配置信息
		Route::get('company/mailInfo', 'CompanyController@mailInfo');
		//offer模板新增与修改
		Route::post('company/offerTemplate', 'CompanyController@offerTemplate');
		//offer模板详情
		Route::get('company/offerInfo', 'CompanyController@offerInfo');
		//发送邮件offer
		Route::get('company/sendOffer', 'CompanyController@sendOffer');
		//邮件测试
		Route::post('company/testMail', 'CompanyController@testMail');
		//招聘概况
		Route::get('company/statistics', 'CompanyController@statistics');
		//招聘详情
		Route::post('company/detailsList', 'CompanyController@detailsList');

		//组织结构
		Route::get('department', 'DepartmentController@all');
		Route::get('department/{id}/flag/{flag}', 'DepartmentController@get');
		Route::get('department/getStaff/{id}', 'DepartmentController@getStaff');
		Route::post('department', 'DepartmentController@add');
		Route::put('department/{id}', 'DepartmentController@put');
		Route::delete('department/{id}', 'DepartmentController@remove');
		//员工
		Route::post('staff', 'StaffController@add');
		Route::get('staff/{id}', 'StaffController@get');
		Route::put('staff/{id}', 'StaffController@put');
		Route::post('staff/remove', 'StaffController@remove');
		Route::post('staff/move', 'StaffController@moveStaff');
		Route::post('staff/import', 'StaffController@import');
		Route::post('staff/export', 'StaffController@export');
		//流程
		Route::get('flow', 'FlowController@all');
		Route::get('flow/getAll', 'FlowController@getAll');
		Route::post('flow', 'FlowController@add');
		Route::put('flow/{id}', 'FlowController@put');
		Route::post('flow/{id}/type/{type}', 'FlowController@status');
		Route::post('flow/remove/{id}', 'FlowController@remove');
		Route::get('flow/step/{id}', 'FlowController@step');
		//步骤
		Route::post('step', 'StepController@add');
		Route::put('step/{id}/type/{type}', 'StepController@put');
		Route::post('step/{id}', 'StepController@remove');
		Route::get('step/conclusion', 'StepController@conclusion');
		Route::get('step/{id}', 'StepController@get');
		Route::get('step/role', 'StepController@role');
		//原因
		Route::get('reason/{id}', 'ReasonController@all');
		Route::post('reason', 'ReasonController@add');
		Route::put('reason/{id}', 'ReasonController@put');
		Route::post('reason/{id}', 'ReasonController@remove');
		//角色
		Route::get('role', 'RoleController@all');
		Route::post('role', 'RoleController@add');
		Route::put('role/{id}', 'RoleController@put');
		Route::delete('role/{id}', 'RoleController@remove');
		Route::get('role/permission/{id}', 'RoleController@getRolePermission');
		Route::post('role/permission/{id}', 'RoleController@editRolePermission');
		Route::post('role/getUser/{id}', 'RoleController@getRoleUser');
		Route::post('role/user/{id}', 'RoleController@editRoleUser');
		//收藏
		Route::post('resume/collection/', 'ResumeController@collection');
		Route::post('resume/cancel/', 'ResumeController@cancel');
		//简历
		Route::post('resume/all', 'ResumeController@all');
		Route::post('resume/getAll', 'ResumeController@getAll');
		Route::get('resume/{id}', 'ResumeController@get');
		Route::post('resume', 'ResumeController@add');
		Route::put('resume/{id}', 'ResumeController@put');
		Route::post('resume/remove', 'ResumeController@remove');
		Route::post('resume/file/{id}', 'ResumeController@uploadFile');
		Route::post('resume/image/{id}', 'ResumeController@uploadImage');
		Route::delete('resume/file/{id}', 'ResumeController@removeFile');
		Route::post('resume/batchAdd', 'ResumeController@batchAdd');
		Route::post('resume/position', 'ResumeController@position');
		Route::post('resume/cancelPosition', 'ResumeController@cancelPosition');
		Route::post('resume/addPosition', 'ResumeController@addPosition');
		Route::post('resume/plug', 'ResumeController@plug');
		Route::post('resume/status', 'ResumeController@changeStatus');

		//工作经历
		Route::get('job/{id}', 'JobController@get');
		Route::post('job', 'JobController@add');
		Route::put('job/{id}', 'JobController@put');
		Route::post('job/{id}', 'JobController@remove');

		//项目经验
		Route::get('item/{id}', 'ItemController@get');
		Route::post('item', 'ItemController@add');
		Route::put('item/{id}', 'ItemController@put');
		Route::post('item/{id}', 'ItemController@remove');

		//教育经历
		Route::get('edu/{id}', 'EducationController@get');
		Route::post('edu', 'EducationController@add');
		Route::put('edu/{id}', 'EducationController@put');
		Route::post('edu/{id}', 'EducationController@remove');

		//职位
		Route::get('position/deptName', 'PositionController@deptName');
		Route::get('position/deptUser', 'PositionController@deptUser');
		Route::post('position/get', 'PositionController@getName');
		Route::post('position/all', 'PositionController@all');
		Route::post('position/getAll', 'PositionController@getAll');
		Route::get('position/{id}', 'PositionController@get');
		Route::post('position', 'PositionController@add');
		Route::put('position/{id}', 'PositionController@put');
		Route::post('position/remove', 'PositionController@remove');
		Route::post('position/list', 'PositionController@list');
		//系统启动流程
		Route::get('sysFlow/start/{id}/type/{type}', 'SysflowController@startFlow');
		Route::post('sysFlow/move/{id}', 'SysflowController@move');
		Route::get('sysFlow/reason/{id}', 'SysflowController@getReason');
		Route::get('sysFlow/{id}/type/{type}', 'SysflowController@get');
		Route::put('sysFlow/{id}', 'SysflowController@put');
		Route::get('sysFlow/get/{id}/type/{type}', 'SysflowController@getSingle');
		Route::get('sysFlow/all/{id}', 'SysflowController@all');
		Route::post('sysFlow/score/{id}', 'SysflowController@score');
		Route::post('sysFlow/sendOffer/{id}', 'SysflowController@sendOffer');

		//面试地点配置
		Route::get('address', 'AddressController@all');
		Route::get('address/{id}', 'AddressController@get');
		Route::post('address', 'AddressController@add');
		Route::put('address/{id}', 'AddressController@put');
		Route::post('address/{id}', 'AddressController@remove');

		//支付宝支付
		Route::post('pay', 'PayController@index');
		Route::post('payInfo', 'PayController@info');
		Route::post('orderPrice', 'PayController@orderPrice');
		Route::post('gopay', 'PayController@gopay');
		Route::get('gopay/order/{id}', 'PayController@orderInfo');
		Route::post('wxpay', 'PayController@wxpay');

		//发票
		Route::post('invoice', 'InvoiceController@add');
		//消费记录
		Route::post('order/all', 'OrderController@all');
		Route::get('order/{id}', 'OrderController@get');
		Route::post('order/export', 'OrderController@export');

		//获取版本信息
		Route::get('version', 'VersionController@all');

		//消息
		//通讯录
		Route::get('message', 'MessageController@messageList');
		//发送邀请短信
		Route::post('message/sendInvitations', 'MessageController@sendInvitations');
		//创建群
		Route::post('message/createTeam', 'MessageController@createTeam');
		//拉人
		Route::post('message/add', 'MessageController@add');
		//解散群
		Route::post('message/remove', 'MessageController@remove');
		//踢人
		Route::post('message/kick', 'MessageController@kick');
		//修改群昵称
		Route::post('message/upTeamNick', 'MessageController@upTeamNick');
		//退群
		Route::post('message/leave', 'MessageController@leave');
		//消息
		Route::post('message/sendMsg', 'MessageController@sendMsg');
		//素材图片上传
		Route::post('message/material', 'MessageController@material');
		//素材库列表
		Route::get('message/materialList', 'MessageController@materialList');
		//删除图片
		Route::post('message/removeImg', 'MessageController@removeImg');
		//系统消息图片上传
		Route::post('message/msgEditor', 'MessageController@msgEditor');
		//创建系统消息
		Route::post('message/addSystemMsg', 'MessageController@addSystemMsg');
		//系统消息列表
		Route::post('message/systemMsgList', 'MessageController@systemMsgList');
		//系统消息发送
		Route::post('message/sendSystemMsg', 'MessageController@sendSystemMsg');
		//申请简历权限
		Route::post('message/applyControl', 'MessageController@applyControl');
		//修改简历所有人
		Route::post('message/applyAction', 'MessageController@applyAction');
		//系统消息详情
		Route::get('message/msgInfo', 'MessageController@msgInfo');
		//面试通知
		Route::post('message/interviewMsg', 'MessageController@interviewMsg');
		//面试通知处理
		Route::post('message/interviewmsgDeal', 'MessageController@interviewmsgDeal');
		//历史消息systemInfo
		Route::get('message/historyMsg', 'MessageController@historyMsg');
		//历史消息
		Route::post('message/delMsg', 'MessageController@delMsg');
		//系统消息历史
		Route::get('message/systemHistoryMsg', 'MessageController@systemHistoryMsg');
		//面试小助手历史
		Route::get('message/historyInterview', 'MessageController@historyInterview');
		//面试小助手历史详情
		Route::get('message/interviewInfo', 'MessageController@interviewInfo');
		//群通知
		Route::post('message/teamNotice', 'MessageController@teamNotice');
		//简历详情
		Route::get('message/resumeInfo', 'MessageController@resumeInfo');
		//base64intervierInfo
		Route::post('message/img64', 'MessageController@img64');
		//配置图片上传
        Route::post('message/img', 'MessageController@img');
        Route::post('persional/updateInfo', 'persionalController@updateInfo');
//日历
		//日历
		Route::get('calendar/calendarList', 'CalendarController@calendarList');
		//紧凑日历
		Route::get('calendar/calendarWeek', 'CalendarController@calendarWeek');
		//添加/修改日历
		Route::post('calendar/addCalendar', 'CalendarController@addCalendar');
		//面试邀请
		Route::post('company/importInterview', 'CompanyController@importInterview');
//        个人信息
		Route::get('persional/persionalInfo', 'PersionalController@persionalInfo');
		//人员
		Route::get('statistics/allPeople', 'StatisticsController@allPeople');
		//统计
		Route::post('statistics/statistics', 'StatisticsController@statistics');
		//趋势图
		Route::post('statistics/trendChart', 'StatisticsController@trendChart');
		//头像修改
		Route::post('persional/upImg', 'PersionalController@upImg');
		//姓名修改
		Route::post('persional/upName', 'PersionalController@upName');
		//我的收藏
		Route::get('persional/collectList/{type}', 'PersionalController@collectList');
//        Route::post('persional/collectList', 'PersionalController@collectList');
		//我的发布
		Route::get('persional/issueList/{type}', 'PersionalController@issueList');
		//修改密码
		Route::post('persional/changePwd', 'PersionalController@changePwd');
		//切换企业
		Route::put('persional/changeCmp', 'PersionalController@changeCmp');
		//退出企业
		Route::put('persional/exitCmp', 'PersionalController@exitCmp');

	});
